home *** CD-ROM | disk | FTP | other *** search
- Path: ukcc.uky.edu!JJSTEP00
- From: JJSTEP00@ukcc.uky.edu (Jason Stephenson)
- Newsgroups: comp.lang.c
- Subject: Passing structures--related Q
- Date: Thu, 22 Feb 96 14:48:16 EST
- Organization: The University of Kentucky
- Message-ID: <17735D030S86.JJSTEP00@ukcc.uky.edu>
- NNTP-Posting-Host: ukcc.uky.edu
-
- Say you have the following struct defined:
-
- struct point
- {
- int x, y;
- }
-
- Given the prototyp below:
- void some_func(point myPoint)
-
- can you safely do this:
-
- /* code */
- some_func({x, y});
- /* more code */
-
- What I'm trying to figure out is, can you replace a struct with its values?
-